/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", system-ui, sans-serif;
}

body {
    background-color: #121212;
    color: #ffffff;
    min-height: 100vh;
}

/* 颜色变量（QQ音乐风格） */
:root {
    --primary: #C62F2F;    /* 主红色 */
    --secondary: #1E1E1E;  /* 深色背景 */
    --secondary-light: #2C2C2C; /* 浅深色背景 */
    --text-primary: #FFFFFF;   /* 主文本色 */
    --text-secondary: #AAAAAA; /* 次文本色 */
    --border-gray: #333333;    /* 边框色 */
}

/* ########## 核心修改：用CSS替代Font Awesome图标 ########## */
/* 图标基础样式 */
.icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    font-size: 16px;
}

/* 常用图标替代（用文字/符号模拟） */
.icon-music::before { content: "♪"; }
.icon-list::before { content: "☰"; }
.icon-heart::before { content: "♥"; }
.icon-upload::before { content: "↑"; }
.icon-microphone::before { content: "🎤"; }
.icon-guitar::before { content: "🎸"; }
.icon-headphones::before { content: "🎧"; }
.icon-bars::before { content: "☰"; }
.icon-search::before { content: "🔍"; }
.icon-bell::before { content: "🔔"; }
.icon-cog::before { content: "⚙"; }
.icon-random::before { content: "🔀"; }
.icon-step-backward::before { content: "◀◀"; }
.icon-play::before { content: "▶"; }
.icon-pause::before { content: "❚❚"; }
.icon-step-forward::before { content: "▶▶"; }
.icon-repeat::before { content: "🔁"; }
.icon-volume-up::before { content: "🔊"; }
.icon-trash::before { content: "🗑"; }

/* 布局组件 */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    width: 240px;
    background-color: var(--secondary);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    overflow-y: auto;
}

.sidebar .sidebar-content {
    padding: 0 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding: 0 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
}

/* 导航菜单 */
.nav-menu {
    list-style: none;
    margin-bottom: 30px;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-link.active {
    background-color: var(--secondary-light);
    color: var(--text-primary);
}

.nav-link:hover {
    background-color: var(--secondary-light);
    color: var(--text-primary);
}

.nav-icon {
    width: 20px;
    text-align: center;
}

/* 分类标题 */
.category-title {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding: 0 15px;
}

/* 用户信息 */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-gray);
    margin-top: auto;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--border-gray); /* 替代外部头像 */
    display: flex;
    align-items: center;
    justify-content: center;
    content: "👤";
}

.user-name {
    font-size: 14px;
    color: var(--text-primary);
}

.user-status {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 顶部 header */
.header {
    background-color: var(--secondary-light);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border-gray);
}

.menu-toggle {
    color: var(--text-primary);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: none; /* 移动端显示 */
}

.search-container {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.search-input {
    width: 100%;
    background-color: var(--secondary);
    border: none;
    border-radius: 20px;
    padding: 10px 15px 10px 40px;
    color: var(--text-primary);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.header-actions {
    display: flex;
    gap: 20px;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s;
}

.action-btn:hover {
    color: var(--text-primary);
}

/* 页面内容 */
.page-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 25px;
}

.page-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.page-description {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 音乐列表（移除music-cover相关样式） */
.music-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.music-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.music-item:hover {
    background-color: var(--secondary-light);
}

.music-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.music-index {
    width: 20px;
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

.music-detail {
    display: flex;
    flex-direction: column;
}

.music-title {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 2px;
}

.music-singer {
    color: var(--text-secondary);
    font-size: 12px;
}

.music-extra {
    display: flex;
    align-items: center;
    gap: 20px;
}

.music-album {
    color: var(--text-secondary);
    font-size: 12px;
    display: none;
}

.music-duration {
    color: var(--text-secondary);
    font-size: 12px;
}

.music-actions {
    display: flex;
    gap: 15px;
}

.music-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.music-btn:hover {
    color: var(--primary);
}

.music-btn.liked {
    color: var(--primary);
}

/* 上传页面 */
.upload-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--secondary-light);
    padding: 30px;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    width: 100%;
    background-color: var(--secondary);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    padding: 12px 15px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.3s;
}

.form-input:focus {
    border-color: var(--primary);
}

.file-drop-area {
    border: 2px dashed var(--border-gray);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-drop-area:hover {
    border-color: var(--primary);
}

.file-icon {
    font-size: 40px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.file-message {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 5px;
}

.file-submessage {
    color: var(--text-secondary);
    font-size: 12px;
}

.file-input {
    display: none;
}

.upload-btn {
    background-color: var(--primary);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.upload-btn:hover {
    background-color: #a82424;
}

/* 登录页面 */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    background-color: var(--secondary-light);
    padding: 40px;
    border-radius: 12px;
}

.login-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 30px;
}

.form-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-gray);
}

.form-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
}

.form-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* 底部播放器（移除封面图） */
.player {
    background-color: var(--secondary-light);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-top: 1px solid var(--border-gray);
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 250px;
}

.now-playing-info {
    display: flex;
    flex-direction: column;
}

.now-playing-title {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 2px;
}

.now-playing-artist {
    color: var(--text-secondary);
    font-size: 12px;
}

.like-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.like-btn:hover {
    color: var(--primary);
}

.player-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
    font-size: 16px;
}

.control-btn:hover {
    color: var(--text-primary);
}

.play-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--text-primary);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.play-btn:hover {
    background-color: #f0f0f0;
    color: var(--primary);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-display {
    color: var(--text-secondary);
    font-size: 12px;
    width: 40px;
    text-align: center;
}

.progress-bar {
    flex: 1;
    height: 3px;
    background-color: var(--border-gray);
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.1s linear;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 120px;
}

.volume-icon {
    color: var(--text-secondary);
    font-size: 16px;
}

.volume-slider {
    width: 100%;
    height: 3px;
    background-color: var(--border-gray);
    border-radius: 3px;
    cursor: pointer;
}

.volume-level {
    height: 100%;
    background-color: var(--text-secondary);
    width: 70%;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -240px;
        top: 0;
        height: 100vh;
        z-index: 100;
    }

    .sidebar.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .music-album {
        display: none;
    }

    .now-playing {
        width: auto;
    }

    .volume-control {
        display: none;
    }
}